﻿<?php error_reporting(E_ALL^E_NOTICE^E_WARNING^E_DEPRECATED);?>
<!-- AUI Framework -->
<!DOCTYPE html>
    <html>
    <head>

        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>淘宝账目管理</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

        <!-- Favicons -->

        <link rel="apple-touch-icon-precomposed" sizes="144x144" href="assets/images/icons/apple-touch-icon-144-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="114x114" href="assets/images/icons/apple-touch-icon-114-precomposed.png">
        <link rel="apple-touch-icon-precomposed" sizes="72x72" href="assets/images/icons/apple-touch-icon-72-precomposed.png">
        <link rel="apple-touch-icon-precomposed" href="assets/images/icons/apple-touch-icon-57-precomposed.png">
        <link rel="shortcut icon" href="assets/images/icons/favicon.png">

        <!--[if lt IE 9]>
          <script src="assets/js/minified/core/html5shiv.min.js"></script>
          <script src="assets/js/minified/core/respond.min.js"></script>
        <![endif]-->

        <!--[if lt IE 7]>
        <link rel="stylesheet" type="text/css" href="assets/css/minified/icons-ie7.min.css">
        <![endif]-->

        <!-- AgileUI CSS Core -->

        <link rel="stylesheet" type="text/css" href="assets/css/minified/aui-production.min.css">

        <!-- Theme UI -->

        <link id="layout-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/layouts/default.min.css">
        <link id="elements-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/elements/default.min.css">

        <!-- AgileUI Responsive -->

        <link rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/responsive.min.css">

        <!-- AgileUI JS -->

      

     
     

    </head>

    <body >
       
                    

    <!-- AgileUI CSS -->

    <link rel="stylesheet" type="text/css" href="assets/css/minified/aui-production.min.css">

    <!-- Theme UI -->

    <link id="layout-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/layouts/default.min.css">
    <link id="elements-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/elements/default.min.css">

    <link rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/responsive.min.css">

    <!-- AgileUI JS -->

     <script type="text/javascript" src="assets/js/aui-production.js"></script>
		 <script type="text/javascript" src="assets/js/aui-demo.js"></script>



    <!-- AgileUI CSS -->

    <link rel="stylesheet" type="text/css" href="assets/css/minified/aui-helpers.min.css">

    <!-- AgileUI CSS Widgets -->

    <link rel="stylesheet" type="text/css" href="assets/css/minified/elements/buttons.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/minified/widgets/datepicker.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/minified/widgets/tabs.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/minified/widgets/dropdown.min.css">
    <link rel="stylesheet" type="text/css" href="assets/css/minified/widgets/tooltip.min.css">

    <!-- Theme UI -->

    <link id="layout-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/layouts/default.min.css">
    <link id="elements-theme" rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/color-schemes/elements/default.min.css">

    <link rel="stylesheet" type="text/css" href="assets/themes/minified/agileui/responsive.min.css">

    <!-- AgileUI JS (Uncomment the next line) -->

    <!-- <script type="text/javascript" src="assets/js/minified/aui-core.min.js"></script> -->

    <!-- AgileUI JS Widgets -->
<a href="index.php" class="btn medium primary-bg" title="">
            <span class="button-content">账目</span>
        </a>
		<a href="jinhuo.php" class="btn medium primary-bg" title="">
            <span class="button-content">进货</span>
        </a>
   <?php
	$conn=mysql_connect('127.0.0.1','root','');
	 
	mysql_query("set names 'utf8'"); //数据库输出编码 应该与你的数据库编码保持一致.南昌网站建设公司百恒网络PHP工程师建议用UTF-8 国际标准编码.
	 
	mysql_select_db('taobao'); //打开数据库
	 
	
	 function getp($name){
	 	//echo ("select chengben from chanpin where name='$name'");
	 	$result = mysql_query("select chengben,pinming from chanpin where name='$name'");
		$row = mysql_fetch_array($result); 
		$price = $row['chengben'];
		return $price;
	 }
	  function getn($name){
	 	//echo ("select chengben from chanpin where name='$name'");
	 	$result = mysql_query("select pinming from chanpin where name='$name'");
		$row = mysql_fetch_array($result); 
		$pinming = $row['pinming'];
		return $pinming;
	 }
	//echo getp('fengqin');
  $type = $_POST['type'];
 
  if($_SERVER['REQUEST_METHOD'] == 'POST' and $type!='chaxun'){
  		$huopin = '';
		$chengben = 0;
		$lirun = 0;
		$shoujia = 0;
		$shijian = $_POST['shijian'];
		$danhao = $_POST['danhao'];
		$yunfei = $_POST['yunfei'];
		$shoujia = $_POST['shoujia']?$_POST['shoujia']:0;
		if($_POST['fengqin']!=''){
			$huopin = $huopin.getn('fengqin')."x".$_POST['fengqin']."|";
			$chengben = $chengben+(float)getp('fengqin')*(float)$_POST['fengqin'];
		}
		if($_POST['youyuzai']!=''){
			$huopin = $huopin.getn('youyuzai')."x".$_POST['youyuzai']."|";
			$chengben = $chengben+(float)(getp('youyuzai'))*(float)($_POST['youyuzai']);
		}
		if($_POST['zupian']!=''){
			$huopin = $huopin.getn('zupian')."x".$_POST['zupian']."|";
			$chengben = $chengben+(float)(getp('zupian'))*(float)($_POST['zupian']);
		}
		if($_POST['paojiao']!=''){
			$huopin = $huopin.getn('paojiao')."x".$_POST['paojiao']."|";
			$chengben = $chengben+(float)(getp('paojiao'))*(float)($_POST['paojiao']);
		}
		if($_POST['youyutou']!=''){
			$huopin = $huopin.getn('youyutou')."x".$_POST['youyutou']."|";
			$chengben = $chengben+(float)(getp('youyutou'))*(float)($_POST['youyutou']);
		}
		if($_POST['daiyu']!=''){
			$huopin = $huopin.getn('daiyu')."x".$_POST['daiyu']."|";
			$chengben = $chengben+(float)(getp('daiyu'))*(float)($_POST['daiyu']);
		}
			if($_POST['mabu']!=''){
			$huopin = $huopin.getn('mabu')."x".$_POST['mabu']."|";
			$chengben = $chengben+(float)(getp('mabu'))*(float)($_POST['mabu']);
		}
		if($_POST['huanghua']!=''){
			$huopin = $huopin.getn('huanghua')."x".$_POST['huanghua']."|";
			$chengben = $chengben+(float)(getp('huanghua'))*(float)($_POST['huanghua']);
		}
		if($_POST['bayu']!=''){
			$huopin = $huopin.getn('bayu')."x".$_POST['bayu']."|";
			$chengben = $chengben+(float)(getp('bayu'))*(float)($_POST['bayu']);
		}
		if($_POST['xia']!=''){
			$huopin = $huopin.getn('xia')."x".$_POST['xia']."|";
			$chengben = $chengben+(float)(getp('xia'))*(float)($_POST['xia']);
		}
		if($_POST['beiding']!=''){
			$huopin = $huopin.getn('beiding')."x".$_POST['beiding']."|";
			$chengben = $chengben+(float)(getp('beiding'))*(float)($_POST['beiding']);
		}
		if($_POST['xiuxian']!=''){
			$huopin = $huopin.getn('xiuxian')."x".$_POST['xiuxian']."|";
			$chengben = $chengben+(float)(getp('xiuxian'))*(float)($_POST['xiuxian']);
		}
		if($_POST['meiren']!=''){
			$huopin = $huopin.getn('meiren')."x".$_POST['meiren']."|";
			$chengben = $chengben+(float)(getp('meiren'))*(float)($_POST['meiren']);
		}
		if($_POST['xiajiang']!=''){
			$huopin = $huopin.getn('xiajiang')."x".$_POST['xiajiang']."|";
			$chengben = $chengben+(float)(getp('xiajiang'))*(float)($_POST['xiajiang']);
		}
		if($_POST['donggan']!=''){
			$huopin = $huopin.getn('donggan')."x".$_POST['donggan']."|";
			$chengben = $chengben+(float)(getp('donggan'))*(float)($_POST['donggan']);
		}
		if($_POST['guofu']!=''){
			$huopin = $huopin.getn('guofu')."x".$_POST['guofu']."|";
			$chengben = $chengben+(float)(getp('guofu'))*(float)($_POST['guofu']);
		}
			if($_POST['haishen']!=''){
			$huopin = $huopin.getn('haishen')."x".$_POST['haishen']."|";
			$chengben = $chengben+(float)(getp('haishen'))*(float)($_POST['haishen']);
		}
		if($_POST['baoyu']!=''){
			$huopin = $huopin.getn('baoyu')."x".$_POST['baoyu']."|";
			$chengben = $chengben+(float)(getp('baoyu'))*(float)($_POST['baoyu']);
		}
		if($_POST['haizhetou']!=''){
			$huopin = $huopin.getn('haizhetou')."x".$_POST['haizhetou']."|";
			$chengben = $chengben+(float)(getp('haizhetou'))*(float)($_POST['haizhetou']);
		}
		if($_POST['haizhetouhe']!=''){
			$huopin = $huopin.getn('haizhetouhe')."x".$_POST['haizhetouhe']."|";
			$chengben = $chengben+(float)(getp('haizhetouhe'))*(float)($_POST['haizhetouhe']);
		}
		if($_POST['haishen2']!=''){
			$huopin = $huopin.getn('haishen2')."x".$_POST['haishen2']."|";
			$chengben = $chengben+(float)(getp('haishen2'))*(float)($_POST['haishen2']);
		}
		//果干
		if($_POST['caomei']!=''){
			$huopin = $huopin.getn('caomei')."x".$_POST['caomei']."|";
			$chengben = $chengben+(float)(getp('caomei'))*(float)($_POST['caomei']);
		}
		if($_POST['huangtao']!=''){
			$huopin = $huopin.getn('huangtao')."x".$_POST['huangtao']."|";
			$chengben = $chengben+(float)(getp('huangtao'))*(float)($_POST['huangtao']);
		}
		if($_POST['pingguo']!=''){
			$huopin = $huopin.getn('pingguo')."x".$_POST['pingguo']."|";
			$chengben = $chengben+(float)(getp('pingguo'))*(float)($_POST['pingguo']);
		}
		if($_POST['mangguo']!=''){
			$huopin = $huopin.getn('mangguo')."x".$_POST['mangguo']."|";
			$chengben = $chengben+(float)(getp('mangguo'))*(float)($_POST['mangguo']);
		}
		if($_POST['manyue']!=''){
			$huopin = $huopin.getn('manyue')."x".$_POST['manyue']."|";
			$chengben = $chengben+(float)(getp('manyue'))*(float)($_POST['manyue']);
		}
		if($_POST['hamigua']!=''){
			$huopin = $huopin.getn('hamigua')."x".$_POST['hamigua']."|";
			$chengben = $chengben+(float)(getp('hamigua'))*(float)($_POST['hamigua']);
		}
		if($_POST['hongxing']!=''){
			$huopin = $huopin.getn('hongxing')."x".$_POST['hongxing']."|";
			$chengben = $chengben+(float)(getp('hongxing'))*(float)($_POST['hongxing']);
		}
		
		if($_POST['dongganxin']!=''){
			$huopin = $huopin.getn('dongganxin')."x".$_POST['dongganxin']."|";
			$chengben = $chengben+(float)(getp('dongganxin'))*(float)($_POST['dongganxin']);
		}
		if($_POST['4aganshen']!=''){
			$huopin = $huopin.getn('4aganshen')."x".$_POST['4aganshen']."|";
			$chengben = $chengben+(float)(getp('4aganshen'))*(float)($_POST['4aganshen']);
		}
		//echo($huopin."<br>".$chengben);
//		exit();
		$fengqin = $_POST['fengqin'];
		$youyuzai = $_POST['youyuzai'];
		$zupian = $_POST['zupian'];
		$paojiao = $_POST['paojiao'];
		$youyutou = $_POST['youyutou'];
		$daiyu = $_POST['daiyu'];
		$mabu = $_POST['mabu'];
		$huanghua = $_POST['huanghua'];
		$bayu = $_POST['bayu'];
		$xia = $_POST['xia'];
		$beiding = $_POST['beiding'];
		$xiuxian = $_POST['xiuxian'];
		$meiren = $_POST['meiren'];
		
		$xiajiang = $_POST['xiajiang'];
		$donggan = $_POST['donggan'];
		$guofu = $_POST['guofu'];
		$haishen = $_POST['haishen'];
		$baoyu = $_POST['baoyu'];
		
		$haizhetou = $_POST['haizhetou'];
		$haizhetouhe = $_POST['haizhetouhe'];
		$haishen2 = $_POST['haishen2'];
		$beizhu = $_POST['beizhu'];
		if($huopin=='' and $beizhu==''){
			$huopin="刷单";
		}
		elseif($huopin=='' and $beizhu!=''){
			$huopin="费用扣除";
			}
		$lirun = (float)((float)$shoujia-(float)$chengben-(float)$yunfei);
		echo("insert into zhangmu values('0','$shijian','$danhao','$huopin',$yunfei,$chengben,$lirun,$shoujia,'$beizhu')");
		//exit();
		mysql_query("insert into zhangmu values('0','$shijian','$danhao','$huopin',$yunfei,$chengben,$lirun,$shoujia,'$beizhu')");
		echo("<script>alert('录入成功！');window.location.href='/'</script>");
		exit();
	
  }
  else{
  
  }
   ?>



	<div class="example-box">
    <div class="example-code clearfix">

        <form action="/index.php" class="col-md-12 center-margin" method="post">
		
		 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        时间
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input class="datepicker no-shadow" name="shijian">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                       单号
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="danhao" id="">
                </div>
            </div>
			
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        运费
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="yunfei" id="">
                </div>
				
				 <div class="form-label col-md-2">
                    <label for="">
                        售价
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="shoujia" id="">
                </div>
				
            </div>
		
		
            <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        软烤风琴鱿鱼（辣味、原味）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="fengqin" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                        鱿鱼仔（辣味、原味）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="youyuzai" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        软烤麻辣章鱼片（辣味、原味）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="zupian" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                       软烤泡椒章鱼片
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="paojiao" id="">
                </div>
            </div>
			 <div class="form-row">
               <!-- <div class="form-label col-md-2">
                    <label for="">
                       软烤比管鱼（鱿鱼头）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="youyutou" id="">
                </div>-->
                <div class="form-label col-md-2">
                    <label for="">
                      软烤黄花鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="huanghua" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                      软烤带鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="daiyu" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                       软烤马步鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="mabu" id="">
                </div>
				
            </div>
			 <div class="form-row">
               <!-- <div class="form-label col-md-2">
                    <label for="">
                       软烤鲅鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="bayu" id="">
                </div>-->
				<div class="form-label col-md-2">
                    <label for="">
                        软烤大虾
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="xia" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                       软烤贝丁（不带豆）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="beiding" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                        休闲鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="xiuxian" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        美人渔系列
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="meiren" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                       虾酱  
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="xiajiang" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        冻干无花果
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="donggan" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                        无花果果脯
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="guofu" id="">
                </div>
            </div>
			 <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        海参
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="haishen" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                       鲍鱼
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="baoyu" id="">
                </div>
            </div>
             <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        海蜇头（包）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="haizhetou" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                      海蜇头（盒）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="haizhetouhe" id="">
                </div>
            </div>
            
            
             <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        草莓干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="caomei" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                      黄桃干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="huangtao" id="">
                </div>
            </div>
            
              <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        苹果干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="pingguo" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                      芒果干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="mangguo" id="">
                </div>
            </div>
            
              <div class="form-row">
                <div class="form-label col-md-2">
                    <label for="">
                        蔓越莓干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="manyue" id="">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                      哈密瓜干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="hamigua" id="">
                </div>
            </div>
            
            
             <div class="form-row">
             
             <div class="form-label col-md-2">
                    <label for="">
                      红杏干
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="hongxing" id="">
                </div>
             
                <div class="form-label col-md-2">
                    <label for="">
                      吕福记海参
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="haishen2" id="">
                </div>
				
            </div>
            
              <div class="form-row">
             
             <div class="form-label col-md-2">
                    <label for="">
                      冻干无花果（新包装）
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="dongganxin" id="">
                </div>
             
                <div class="form-label col-md-2">
                    <label for="">
                      4A级干参50g
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input  type="text" name="4aganshen" id="">
                </div>
				
            </div>
			
			 <div class="form-row">
              
				 <div class="form-label col-md-2">
                    <label for="">
                        备注
                    </label>
                </div>
                <div class="form-input col-md-4">
				<textarea name="beizhu" id="" class="large-textarea"></textarea>
                  
                </div>
				
            </div>

		   
<button class="btn primary-bg medium" style=" margin-left:1000px;">
            <span class="button-content" >录入</span>
        </button>
          

        </form>
		
		
		<div class="example-box">
    <div class="example-code">
<h4>
<?php
$kaishi = $_POST['kaishi'];
$jieshu = $_POST['jieshu'];
$tiaojian = '';
if($kaishi!='' and $jieshu!=''){
	$tiaojian = 'where date>="'.$kaishi.'" and date <="'.$jieshu.'"';  
	}
$sql = "select count(*) as a,sum(lirun) as b from   zhangmu  ".$tiaojian." order by id desc ";
//echo $sql;
$result = mysql_query($sql);
				$row = mysql_fetch_array($result); 			
				?>

   <!-- 总计单数:   <?php echo $row['a'];?> 总计利润:<?php echo round($row['b'],2);?>-->
<form action="/" method="post">
<input name="type" type="hidden" value="chaxun">
<br>
<?php 
 if($type=='chaxun'){
	  $result1 = mysql_query("select count(*) as a,sum(lirun) as b,sum(shoujia) as c from   zhangmu where huopin<>'刷单' and  date>='".$_POST['kaishi']."' and date<= '".$_POST['jieshu']."'");
	  //echo "select count(*) as a,sum(lirun)-130 as b,sum(shoujia) as c from   zhangmu where huopin<>'刷单' and  date>='".$_POST['kaishi']."' and date<= '".$_POST['jieshu']."'";
				$row1 = mysql_fetch_array($result1) ;
	 
?>
<div class="form-row" style=" width:100%">
   <div class="form-label col-md-12">
                    <label for="">
                        统计查询结果： <?php echo $kaishi;?>至<?php echo $jieshu;?> 总计：  <?php echo $row1['a'];?>单(不包含刷单)    交易额（不包含刷单）：  <?php echo round($row1['c'],2);?>   利润：   <?php echo round($row1['b'],2);?>    
                    </label>
                </div>  
  </div>
 <?php  }?>    
  <div class="form-row" style=" width:50%">
                <div class="form-label col-md-2">
                    <label for="">
                        从:
                    </label>
                </div>
                <div class="form-input col-md-4">
                    <input class="datepicker no-shadow" name="kaishi" value="<?=$_POST['kaishi'];?>">
                </div>
				<div class="form-label col-md-2">
                    <label for="">
                     至：
                    </label>
                </div>
                <div class="form-input col-md-4">
                  <input class="datepicker no-shadow" name="jieshu" value="<?=$_POST['jieshu'];?>"> 
                </div>
            </div>
<button class="btn primary-bg medium" style=" margin-left:1000px;">
            <span class="button-content" >查询</span>
        </button>
</form>
</h4>
        <table class="table table-striped text-center">
            <thead>
                <tr>
					 <th class="text-center">序号</th>
                    <th class="text-center">时间</th>
                    <th>单号</th>
                    <th class="text-center">货品</th>
					 <th class="text-center">售价</th>
					 <th class="text-center">运费</th>
                    <th class="text-center">总成本</th>
					<th class="text-center">总利润</th>
                    <th class="text-center">备注</th>
                    <th class="text-center">编辑</th>
                </tr>
            </thead>
            <tbody>
			<?php
            if($tiaojian==""){
                $result = mysql_query("select * from   zhangmu ".$tiaojian." order by date desc,id desc  limit 0,300");
            }else{
			    $result = mysql_query("select * from   zhangmu ".$tiaojian." order by date desc,id desc ");
            }
			$i=1;
				while($row = mysql_fetch_array($result)) 			{
				?>
                <tr>
                    <td><?php echo $i;?></td>
					 <td><?php echo $row["date"];?></td>
					 <td><?php echo $row['danhao'];?></td>
					  <td><?php echo $row['huopin'];?></td>
					   <td><?php echo $row['shoujia'];?></td>
					    <td><?php echo $row['yunfei'];?></td>
						 <td><?php echo $row['chengben'];?></td>
						  <td><?php echo $row['lirun'];?></td>
                           <td><?php echo $row['beizhu'];?></td>
                            <td><a href="del.php?id=<?php echo $row['id'];?>" class="btn medium primary-bg"  title="">
            <span class="button-content">删除</span>
        </a></td>
                    
                </tr>
            <?php
			$i=$i+1;
			}
			?>
            </tbody>
        </table>

    </div>
    
</div>

    </div>
    
</div>


    </body>
</html>

